﻿//Write a boolean expression that returns if the bit at position p (counting from 0) 
//in a given integer number v has value of 1. Example: v=5; p=1 -> false.

using System;

namespace BitP
{
    class CheckP
    {
        static void Main()
        {
            Console.Write("Please enter the number v: ");
            int v = int.Parse(Console.ReadLine());
            Console.Write("Please enter the position p: ");
            int p = int.Parse(Console.ReadLine());
            
            bool checkP = (v >> p & 1) == 1;
            Console.WriteLine(checkP);
        }
    }
}
